package com.qiyu.bigdata.reportexcel.mapper;

import com.qiyu.bigdata.reportexcel.entity.ReportInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ReportMapper {

    @Select(value = "select t.id,b.id as book_id,b.book_template,b.book_name,b.book_receiver,s.sheet_name,t.table_code, t.table_para from etl_report_table t join etl_report_sheet s on t.sheet_id = s.id join etl_report_book b on s.book_id = b.id where b.id = #{bookId} ")
    List<ReportInfo> findByBookId(@Param("bookId") int bookId);
}
